package cn.xfdzx.android.apps.shop.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;

import cn.xfdzx.android.apps.shop.R;
import cn.xfdzx.android.apps.shop.bean.HomeClassBeen;
import cn.xfdzx.android.apps.shop.bean.NearShopBeen;

/**
 * @author gzk
 * @date 2020/3/28 0028
 * description：首页附近商店领劵
 */
public class HomeShopJuanGVAdapter extends BaseAdapter {

    private Context mContext;
    private List<NearShopBeen.DataBean.DataListBean.CouponBean> mList;

    private TextView tvHomeShopJuan;

    public HomeShopJuanGVAdapter(Context mContext, List<NearShopBeen.DataBean.DataListBean.CouponBean> mList){
        this.mContext=mContext;
        this.mList=mList;
    }

    @Override
    public int getCount() {
        return mList == null?0:mList.size()>3?3:mList.size();
    }

    @Override
    public Object getItem(int i) {
        return i;
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        view=View.inflate(mContext, R.layout.item_home_shop_juan,null);
        tvHomeShopJuan= view.findViewById(R.id.tv_home_shop_juan);


        return view;
    }
}
